package com.app.bimo.commonbusiness.mvp;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class NotificationClickReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Class cla = null;
        try {
            cla = Class.forName("com.app.bimo.mvp.ui." + "MainActivity");
            //todo 跳转之前要处理的逻辑
            if (cla != null) {
                Intent newIntent = new Intent(context, cla);
                newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                newIntent.putExtras(intent);
                context.startActivity(newIntent);
            }
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }


}

